//
//  HJVideoView.h
//  project
//
//  Created by yefei on 2019/7/20.
//  Copyright © 2019 健健. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class HJVideoControllView, HJVideoView, HJVideoModel,HJViewModel;
@protocol HJVideoViewDelegate <NSObject>

- (void)videoView:(HJVideoView *)videoView didClickIcon:(HJVideoModel *)videoModel;
- (void)videoView:(HJVideoView *)videoView didClickComment:(HJVideoModel *)videoModel;
- (void)videoView:(HJVideoView *)videoView didClickShare:(HJVideoModel *)videoModel;
- (void)videoView:(HJVideoView *)videoView didScrollIsCritical:(BOOL)isCritical;
- (void)videoView:(HJVideoView *)videoView didPanWithDistance:(CGFloat)distance isEnd:(BOOL)isEnd;

@end

@interface HJVideoView : UIView

/**
 加载数据
 */
@property (nonatomic,strong) HJViewModel * viewModel;

@property (nonatomic, weak) id<HJVideoViewDelegate> delegate;
/**
 切换播放层
 */
@property (nonatomic, strong) HJVideoControllView *currentPlayView;
- (instancetype)initWithVC:(UIViewController *)vc isPushed:(BOOL)isPushed;

- (void)setModels:(NSArray *)models index:(NSInteger)index;

- (void)pause;
- (void)resume;
- (void)destoryPlayer;

@end

NS_ASSUME_NONNULL_END
